T
CSharpTest.Net
PropertySerializer<T> Class
Members  Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Reflection Namespace : PropertySerializer<T> Class

Glossary Item Box

Represents a set of properties that can be iterated, read, or written to an IPropertyStorage instance.

Syntax

Visual Basic (Declaration) 
Public Class PropertySerializer(Of T) 
   Inherits PropertySerializer
C# 
public class PropertySerializer<T> : PropertySerializer 

Type Parameters

T

Example

Library/Library.Test/TestPropertySerializer.cs

C#Copy Code
PropertySerializer<HaveReadOnly> ser = new PropertySerializer<HaveReadOnly>();
try
{
    ser.GetType().InvokeMember("Serialize", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Instance, null,
        ser, new object[] { new object(), Dictionary });
}
catch (TargetInvocationException e)
{ Assert.AreEqual(typeof(NotSupportedException), e.InnerException.GetType()); }
try
{
    ser.GetType().InvokeMember("Deserialize", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Instance, null,
        ser, new object[] { new object(), Dictionary });
}
catch (TargetInvocationException e)
{ Assert.AreEqual(typeof(NotSupportedException), e.InnerException.GetType()); }
VB.NETCopy Code
Dim ser As New PropertySerializer(Of HaveReadOnly)()
Try
    ser.[GetType]().InvokeMember("Serialize", System.Reflection.BindingFlags.[Public] Or System.Reflection.BindingFlags.InvokeMethod Or System.Reflection.BindingFlags.Instance, Nothing, ser, New Object() {New Object(), Dictionary})
Catch e As TargetInvocationException
    Assert.AreEqual(GetType(NotSupportedException), e.InnerException.[GetType]())
End Try
Try
    ser.[GetType]().InvokeMember("Deserialize", System.Reflection.BindingFlags.[Public] Or System.Reflection.BindingFlags.InvokeMethod Or System.Reflection.BindingFlags.Instance, Nothing, ser, New Object() {New Object(), Dictionary})
Catch e As TargetInvocationException
    Assert.AreEqual(GetType(NotSupportedException), e.InnerException.[GetType]())
End Try

Inheritance Hierarchy

System.Object
   CSharpTest.Net.Reflection.PropertySerializer
      CSharpTest.Net.Reflection.PropertySerializer<T>

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys